package com.example.his.api.controller.form;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class LoginForm {

  @NotBlank ( message = "用户名不能为空" )
  @Pattern ( regexp = "^[a-zA-Z0-9_-]{5,50}$", message = "用户名格式错误" )
  private String username;

  @NotBlank ( message = "密码不能为空" )
  @Pattern ( regexp = "^[a-zA-Z0-9_-]{6,20}$", message = "密码格式错误" )
  private String password;


}
